import React from 'react'
// ===================================================================== Temp
// ===================================================================== global declare
const { $Lazy } = window
// ===================================================================== Lazy
// ===================================================================== component
class Index extends React.Component{
	state = {
		index: 0,
		pages: [
			{ component: $Lazy.hook(()=>import('./defualt')) },
			{ component: $Lazy.state(()=>import('./entering')) },
			{ component: $Lazy.state(()=>import('./lj-picture'))}
		]
	}

	render(){
		const { index, pages } = this.state
		return <div className='bcf r5px ml5 ex oys scrollbar'>
			{pages.map((v, i) => index === i && <v.component key={i} ref={ref => this[`page${i}Ref`] = ref} thisRef={this.props.thisRef} />)}
		</div>
	}
}

export default Index